package com.cc.openeye.base.network

import com.tencent.kuikly.core.nvi.serialization.json.JSONObject

object RequestHeaderManager {

    private val commonHeaders = JSONObject()

    init {
        createCommonHead()
    }


    private fun createCommonHead() {
        if (commonHeaders.length() > 0) {
            return
        }
        // todo
    }

    fun pingCommonHead(headers: JSONObject): JSONObject {

        val result = JSONObject()

        commonHeaders.keys().forEach {
            result.put(it, commonHeaders.opt(it))
        }

        headers.keys().forEach {
            result.put(it, headers.opt(it))
        }
        return result
    }

}